package com.lw.yygh.user.config;

import com.lw.yygh.user.interceptor.JwtInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//@Configuration
public class UserConfig extends WebMvcConfigurationSupport {
    /**
     * 添加拦截器配置
     * @param registry
     */
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor( new JwtInterceptor()).addPathPatterns( "/**" )
                .excludePathPatterns( "/api/user/login" ,"/api/ucenter/wx/**");
    }
}
